<?php include('base.php')?>
<?php $this->template->startblock('main') ?>
<h3><b>提示信息</b></h3>
<ul class="tr5">
 
	  <li>每一个角色可以分配资源中的所有资源，只有拥有该资源的角色才可以访问该资源页面！</li>
 
</ul>
<h3><b>会员角色列表</b></h3>
<table cellspacing="0" cellpadding="0" width="100%" id="ftable">
	<tr class="tr3 s3">
		<td class="tal" style="padding-left:30px">ID</td>
		<td class="tal" width="70%">角色名称</td>
		<td class="tal" width="7%">编辑</td>
		<td class="tal" width="7%">删除</td>
	</tr>
<?php foreach($arr as $value){?>
	<tr class="tr3" onmouseover="$('#addbt_<?php echo $value['role_id']?>').show()" onmouseout="$('#addbt_<?php echo $value['role_id']?>').hide()">
		<td style="padding-left:30px"><?php echo $value['role_id']?></td>
		<td><?php echo $value['role_name']?>&nbsp;&nbsp;<a href="<?php echo site_url();?>admin/assignrole/rid/<?php echo $value['role_id']?>" title="分配角色资源" style="display:none;" id="addbt_<?php echo $value['role_id']?>">分配角色资源</a></td>
		<td><a class="fourm-two" href="<?php echo site_url();?>admin/editrole/rid/<?php echo $value['role_id']?>"><span class="edit" title="编辑"></span></a></td>
		<td><a class="fourm-two" href="javascript:void(0);" onclick="checkdel('<?php echo site_url();?>post/delrole/rid/<?php echo $value['role_id']?>')"><span class="del" title="删除"></span></a></td>
	</tr>
<?php }?>
	<tr id="addpric" class="tr3 tips" style="display:none">
		<td colspan="4">
			<a href="javascript:void(0)" onclick="delRecord(this)"><span class="close fl"></span></a>
			添加角色：<input type="text" size="40" class="input" name="role_name[]" value="" />
		</td>
	</tr>
	<form id="pricForm" action="<?php echo site_url();?>post/addrole" method="post">
	<tbody id="pricTable">
		<tr class="tr3 tips">
			<td colspan="3">
				<a href="javascript:void(0)" onclick="addRecord('addpric','pricTable')"><span class="open fl"></span></a>
				添加角色：<input type="text" size="40" class="input" name="role_name[]" value="" />
			</td>
			<td><input name="submit" type="submit" value="提 交" class="btn" /></td>
		</tr>
	</tbody>
	</form>
</table>
<?php $this->template->endblock() ?>